<?php
/**
 * Created by PhpStorm.
 * User: zxiaofee
 * Date: 2022/02/24
 * Desc: ip消费限制表
 */

namespace App\Http\Model;

use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;

class ConsumeIpBlacklist extends Base
{
    protected $table = 'consume_ip_blacklist';

    public function __construct(array $attributes = [])
    {
        parent::__construct($this->table, $attributes);
    }


    /**获取宝箱额外赠送豪礼次数
     * @param $boxId
     * @return int
     */
    public function inIpBlacklist($ip){
        $count = DB::table($this->table)
            ->where('ip' ,$ip)->count();
        return $count > 0;
    }

}